Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tap: cask font sharding fix #17305

Closed
wants to merge 1 commit into from

Conversation

bevanjkay
Copy link
Member

@bevanjkay bevanjkay commented May 15, 2024

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew typecheck with your changes locally?
  • Have you successfully run brew tests with your changes locally?

This is not the correct solution, but keeping open for visibility for now.
We need to instead detect if the Cask is a "font cask" based on the artifacts it includes. The same as here - 836d819

Before:

==> font-abel: latest
...
From: https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/f/font-abel.rb

After:

brew info font-abel
==> font-abel: latest
...
From: https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/font/font-a/font-abel.rb

@bevanjkay bevanjkay marked this pull request as draft May 15, 2024 12:43
@bevanjkay bevanjkay force-pushed the font-sharding-updates branch 2 times, most recently from c6d4e37 to 43a922d Compare May 15, 2024 13:02
@Bo98
Copy link
Member

Bo98 commented May 15, 2024

Is this accurate for apps like font-finagler?

@@ -673,8 +673,13 @@ def new_cask_path(token)

sig { params(token: String).returns(String) }
def relative_cask_path(token)
new_cask_path(token).to_s
.delete_prefix("#{path}/")
if token.start_with?("font-")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems simpler to me to move the token.start_with? logic into new_cask_path instead of adjusting the callers in various places.

@bevanjkay
Copy link
Member Author

The whole thing is not quite right at the moment, as mentioned by Bo.

This is not the correct solution, but keeping open for visibility for now.
We need to instead detect if the Cask is a "font cask" based on the artifacts it includes. The same as here - 836d819

@MikeMcQuaid
Copy link
Member

Is this accurate for apps like font-finagler?

Apps like this, if they haven't already been, should be renamed.

@MikeMcQuaid
Copy link
Member

We need to instead detect if the Cask is a "font cask" based on the artifacts it includes. The same as here - 836d819

I can't see how that can be done at brew create time. This seems like the correct fix for that and brew audit should capture the cases where a font artefact is not installed.

@bevanjkay
Copy link
Member Author

I have pushed the change, it will fail the type check because there is a public version of new_cask_path and a private version, but only a private version of new_cask_font_path. Should we combine the logic into the private new_cask_path method instead?

@miccal
Copy link
Member

miccal commented May 15, 2024

Is this accurate for apps like font-finagler?

Apps like this, if they haven't already been, should be renamed.

The naming follows our (strict) token reference, so I do not think they should be renamed.

@bevanjkay
Copy link
Member Author

Superseded by #17311

@bevanjkay bevanjkay closed this May 16, 2024
@MikeMcQuaid
Copy link
Member

The naming follows our (strict) token reference, so I do not think they should be renamed.

We should rename these and change this reference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants